$(function () {
   $('#keep').click(function () {
       var province = $('#Provinces').val;
       var city = $('#Citys').val;
       var mobile = $('#Telephone').val;
       var receiver = $('#Consignee').val;
       var district = $('#Countys').val;
       var place = $('#Street').val;
       var params={
           'province':province,
           'city':city,
           'mobile':mobile,
           'receiver':receiver,
           'district':district,
           'place':place
       }
       $.ajax({
           //请求地址
            url: '/address/',
            //请求方式
            method: 'post',
            //请求内容
            data: JSON.stringify(params),
            //请求内容的数据类型
            contentType: 'application/json',
            // 响应数据的格式
            dataType: 'json',
            success: function (data) {
                if (data.code == 0) {
                    alert('成功');
                    window.location.href = '/'
                } else {
                    alert(data.errmsg)
                }
            }
       })
   })
});